package cerror

const (
	HTTP_UNKNOWN_ERROR                = 10000
	HTTP_ACCOUNT_ERROR                = 10001
	HTTP_ACCOUNT_PASSWORD_ERROR       = 10002
	HTTP_ACCOUNT_NOT_FOUND_ERROR      = 10003
	HTTP_TOKEN_NULL_ERROR             = 10004
	HTTP_TOKEN_INVALID_ERROR          = 10005
	HTTP_TOKEN_ILLEGAL_ERROR          = 10006
	AVATAR_ALREADY_EXIST_ERROR        = 10007
	AVATAR_NOT_FOUND_ERROR            = 10008
	REQUEST_PARAM_SIGNATURE_ERROR     = 10009
	REQUEST_PARAM_TIME_ERROR          = 10010
	PLATFORM_LOGIN_FAILED_ERROR       = 10011
	ACCOUNT_NAME_NOT_MATCH_ERROR      = 10012
	CDKEY_HAS_EXIST_ERROR             = 10013
	CDKEY_NOT_EXIST_ERROR             = 10014
	CDKEY_USED_OVER_ERROR             = 10015
	CDKEY_LIMIT_OVER_ERROR            = 10016
	CDKEY_HAS_USED_ERROR              = 10017
	CDKEY_GROUP_NOT_EXIST_ERROR       = 10018
	PLATFORM_ERROR                    = 10019
	ORDER_STATUS_ERROR                = 10020
	ORDER_NOT_FOUND_ERROR             = 10021
	CENTER_UPDATE_ERROR               = 10022
	AVATAR_CREATE_ERROR               = 10023
	AVATAR_QUERY_ERROR                = 10024
	AVATAR_UPDATE_ERROR               = 10025
	AVATAR_MODULE_UPDATE_ERROR        = 10026
	AVATAR_MODULE_QUERY_ERROR         = 10027
	GAME_CONFIG_QUERY_ERROR           = 10028
	CDKEY_GREOUP_QUERY_ERROR          = 10029
	CDKEY_QUERY_ERROR                 = 10030
	HTTP_PLATFORM_TYPE_ERROR          = 10031
	HTTP_PLATFORM_APPID_ERROR         = 10032
	HTTP_PLATFORM_LOGIN_ERROR         = 10033
	HTTP_PLATFORM_REPORT_ERROR        = 10034
	ADMIN_ACCOUNT_ID_ERROR            = 10035
	ADMIN_AVATAR_ID_ERROR             = 10036
	ADMIN_DATA_ENCODE_ERROR           = 10037
	HTTP_PLATFORM_REPORT_REPEAT_ERROR = 10038
	JSON_UNMARSHAL_ERROR              = 10039
	HTTP_CALL_THIRD_ERROR             = 10040
	JSON_MARSHAL_ERROR                = 10041
	ADMIN_SERVER_KEY_EMPTY_ERROR      = 10042
	HTTP_PLATFORM_ECPM_ERROR          = 10043
	STORE_SET_ERROR                   = 10044
	STORE_GET_ERROR                   = 10045
	HTTP_PLATFORM_QRCODE_ERROR        = 10046
)

func GetErrMsg(errCode int) string {
	switch errCode {
	case HTTP_UNKNOWN_ERROR:
		return "未知错误"
	case HTTP_ACCOUNT_ERROR:
		return "账号错误"
	case HTTP_ACCOUNT_PASSWORD_ERROR:
		return "密码错误"
	case HTTP_ACCOUNT_NOT_FOUND_ERROR:
		return "账号不存在"
	case HTTP_TOKEN_NULL_ERROR:
		return "token为空"
	case HTTP_TOKEN_INVALID_ERROR:
		return "token无效"
	case HTTP_TOKEN_ILLEGAL_ERROR:
		return "token非法"
	case AVATAR_ALREADY_EXIST_ERROR:
		return "角色已经存在"
	case AVATAR_NOT_FOUND_ERROR:
		return "角色不存在"
	case REQUEST_PARAM_SIGNATURE_ERROR:
		return "请求参数签名错误"
	case REQUEST_PARAM_TIME_ERROR:
		return "请求参数时间戳错误"
	case PLATFORM_LOGIN_FAILED_ERROR:
		return "平台登录失败"
	case ACCOUNT_NAME_NOT_MATCH_ERROR:
		return "账号与角色不匹配"
	case CDKEY_HAS_EXIST_ERROR:
		return "cdkey已经存在"
	case CDKEY_NOT_EXIST_ERROR:
		return "cdkey不存在"
	case CDKEY_USED_OVER_ERROR:
		return "cdkey使用次数超过限制"
	case CDKEY_LIMIT_OVER_ERROR:
		return "cdkey使用期限到期"
	case CDKEY_HAS_USED_ERROR:
		return "已使用过同类礼包码"
	case CDKEY_GROUP_NOT_EXIST_ERROR:
		return "礼包类型不存在"
	case PLATFORM_ERROR:
		return "平台错误"
	case ORDER_STATUS_ERROR:
		return "订单状态错误"
	case ORDER_NOT_FOUND_ERROR:
		return "订单不存在"
	case CENTER_UPDATE_ERROR:
		return "中心服更新错误"
	case AVATAR_CREATE_ERROR:
		return "创建角色失败"
	case AVATAR_QUERY_ERROR:
		return "查询角色失败"
	case AVATAR_UPDATE_ERROR:
		return "更新角色失败"
	case AVATAR_MODULE_UPDATE_ERROR:
		return "更新模块数据失败"
	case AVATAR_MODULE_QUERY_ERROR:
		return "查询模块数据失败"
	case GAME_CONFIG_QUERY_ERROR:
		return "查询游戏配置失败"
	case CDKEY_GREOUP_QUERY_ERROR:
		return "查询礼包码组失败"
	case CDKEY_QUERY_ERROR:
		return "查询礼包码失败"
	case HTTP_PLATFORM_TYPE_ERROR:
		return "不支持此平台"
	case HTTP_PLATFORM_APPID_ERROR:
		return "没有找到APPID"
	case HTTP_PLATFORM_LOGIN_ERROR:
		return "平台登录失败"
	case HTTP_PLATFORM_REPORT_ERROR:
		return "平台上报失败"
	case ADMIN_AVATAR_ID_ERROR:
		return "角色ID错误"
	case ADMIN_DATA_ENCODE_ERROR:
		return "角色数据编码错误"
	case HTTP_PLATFORM_REPORT_REPEAT_ERROR:
		return "重复上报"
	case JSON_UNMARSHAL_ERROR:
		return "json解析错误"
	case HTTP_CALL_THIRD_ERROR:
		return "调用第三方错误"
	case JSON_MARSHAL_ERROR:
		return "json序列化错误"
	case ADMIN_SERVER_KEY_EMPTY_ERROR:
		return "服务器密钥为空"
	case HTTP_PLATFORM_ECPM_ERROR:
		return "查询ECPM错误"
	case STORE_SET_ERROR:
		return "缓存存储错误"
	case STORE_GET_ERROR:
		return "缓存获取错误"
	case HTTP_PLATFORM_QRCODE_ERROR:
		return "生成二维码失败"
	}
	return "未知错误"
}
